// 引入koa-router
const Router = require('koa-router')
const router = new Router({ prefix:'/api/goods' })
const {getGoods,addGoods,updateGoods,delGoods,searchGoods} = require('../../controller/goods.controller')
// 获取商品
router.get('/getgoods',getGoods)
// 增加商品
router.post('/addgoods',addGoods)
// 修改商品
router.post('/updategoods',updateGoods)
// 删除商品
router.post('/delgoods',delGoods)
// 搜索商品
router.post('/searchgoods',searchGoods)
module.exports = router